package com.googlecode.kipler.satisfiability.blocking.world;

import java.util.Iterator;

import com.googlecode.kipler.container.dl.Individual;
import com.googlecode.kipler.container.dl.SHIQABox;
import com.googlecode.kipler.container.dl.World;
import com.googlecode.kipler.container.dl.WorldConstraintSystem;
import com.googlecode.kipler.container.dl.operational.IndividualNameComparator;
import com.googlecode.kipler.container.dl.operational.WorldNameComparator;

public class BijectiveEqualityWorldBlocking implements WorldBlocking {

	@Override
	public boolean isBlocked(WorldConstraintSystem wcs, World world) {
		boolean result = false;
		WorldNameComparator comparator = new WorldNameComparator(world);
		// TODO: find some quicker method instead of whole world iteration
		Iterator<World> i = wcs.worldIterator();
		while (i.hasNext() && !result) {
			World other = i.next();
			if (comparator.compare(other, world) < 0
					&& xAncestor.containsAllConceptsOf(x)) {
				result = true;
			}
		}
		return result;
	}

	private boolean isRenaming(World w1, World w2) {
		if (w1.getABox().size() == w2.getABox().size()
				&& w1.getPBox().equals(w2.getPBox())
				&& w1.getTBox().equals(w2.getTBox())
				&& w1.getRBox().equals(w2.getRBox())) {
			
		}
	}
}
